bitkeeper revision 1.1236.1.61 (422996d7OS-GHHO0uCOWruz6V8AWXw)
authorriel@redhat.com[kaf24] <riel@redhat.com[kaf24]>
Sat, 5 Mar 2005 11:24:07 +0000 (11:24 +0000)
committerriel@redhat.com[kaf24] <riel@redhat.com[kaf24]>
Sat, 5 Mar 2005 11:24:07 +0000 (11:24 +0000)
[PATCH] [PATCH] gcc4isms part 1

This patch gets rid of the compile warnings under the xen/
subdirectory, for an x86_32 compile.  The cpuid change has
also been sent to the upstream kernel.

I am not quite sure about the vmx_platform.c bits, since
__s8 should be the same as char, so gcc really shouldn't
warn...

Signed-off-by: Rik van Riel <riel@redhat.com>
 arch/x86/acpi.c             |    2 +-
 arch/x86/domain_build.c     |    2 +-
 arch/x86/pci-pc.c           |    4 ++--
 arch/x86/setup.c            |   16 ++++++++--------
 arch/x86/vmx.c              |    2 +-
 arch/x86/vmx_platform.c     |   20 ++++++++++----------
 common/kernel.c             |    2 +-
 drivers/char/console.c      |    4 ++--
 drivers/char/serial.c       |    4 ++--
 include/asm-x86/processor.h |    2 +-
 include/public/xen.h        |    2 +-
 include/xen/serial.h        |    2 +-
 12 files changed, 31 insertions(+), 31 deletions(-)

13 files changed:
BitKeeper/etc/logging_ok
xen/arch/x86/acpi.c
xen/arch/x86/domain_build.c
xen/arch/x86/pci-pc.c
xen/arch/x86/setup.c
xen/arch/x86/vmx.c
xen/arch/x86/vmx_platform.c
xen/common/kernel.c
xen/drivers/char/console.c
xen/drivers/char/serial.c
xen/include/asm-x86/processor.h
xen/include/public/xen.h
xen/include/xen/serial.h

index db800169bc95e44ed27da9cc319522defa0e0251..a20c296edf6b3f5f5914ccbbac42d86cb74743b7 100644 (file)
@@ -57,6 +57,7 @@ mwilli2@equilibrium.research.intel-research.net
 mwilli2@pug.(none)
 rac61@labyrinth.cl.cam.ac.uk
 rgr22@boulderdash.cl.cam.ac.uk
+riel@redhat.com
 rminnich@lanl.gov
 rn@wyvis.camb.intel-research.net
 rn@wyvis.research.intel-research.net
index 5bbd0cd27297221426cf9f1f271cc7228018e7fc..8df006478a904e5eddfb0f7913725c5495fada1e 100644 (file)
@@ -97,7 +97,7 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
                mapped_size += PAGE_SIZE;
        }
 
-       return ((unsigned char *) base + offset);
+       return ((char *) base + offset);
 }
 
 
index 2948820db9d20b74e8d85725d3be8fd5623b610c..c8e378eb0066d33bd29cf4a1a98ec20401a3ccb7 100644 (file)
@@ -481,7 +481,7 @@ int construct_dom0(struct domain *d,
                si->mod_len, si->mod_start);
     }
 
-    dst = si->cmd_line;
+    dst = (char *)si->cmd_line;
     if ( cmdline != NULL )
     {
         for ( i = 0; i < 255; i++ )
index 871fb81287296b7962107cd62f26628cdd56ca54..64ac8e0586d3a487883ddf586334b6e66463084d 100644 (file)
@@ -816,7 +816,7 @@ static int pci_bios_write (int seg, int bus, int dev, int fn, int reg, int len,
 static int pci_bios_read_config_byte(struct pci_dev *dev, int where, u8 *value)
 {
        int result; 
-       u32 data;
+       u32 data = 0;
 
        if (!value) 
                BUG();
@@ -832,7 +832,7 @@ static int pci_bios_read_config_byte(struct pci_dev *dev, int where, u8 *value)
 static int pci_bios_read_config_word(struct pci_dev *dev, int where, u16 *value)
 {
        int result; 
-       u32 data;
+       u32 data = 0;
 
        if (!value) 
                BUG();
index 79106593bb720ff83d530b8d4b327ec163e45c37..b350229fd03a298b127280ba31174d21a4f2c5a0 100644 (file)
@@ -201,8 +201,8 @@ static void __init init_amd(struct cpuinfo_x86 *c)
  */
 void __init identify_cpu(struct cpuinfo_x86 *c)
 {
-    int junk, i, cpu = smp_processor_id();
-    u32 xlvl, tfms;
+    int i, cpu = smp_processor_id();
+    u32 xlvl, tfms, junk;
 
     phys_proc_id[cpu]    = cpu;
     logical_proc_id[cpu] = 0;
@@ -217,10 +217,10 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
         panic("Ancient processors not supported\n");
 
     /* Get vendor name */
-    cpuid(0x00000000, &c->cpuid_level,
-          (int *)&c->x86_vendor_id[0],
-          (int *)&c->x86_vendor_id[8],
-          (int *)&c->x86_vendor_id[4]);
+    cpuid(0x00000000, (unsigned int *)&c->cpuid_level,
+          (unsigned int *)&c->x86_vendor_id[0],
+          (unsigned int *)&c->x86_vendor_id[8],
+          (unsigned int *)&c->x86_vendor_id[4]);
 
     get_cpu_vendor(c);
                
@@ -455,7 +455,7 @@ static void __init start_of_day(void)
 
 void __init __start_xen(multiboot_info_t *mbi)
 {
-    unsigned char *cmdline;
+    char *cmdline;
     module_t *mod = (module_t *)__va(mbi->mods_addr);
     void *heap_start;
     unsigned long firsthole_start, nr_pages;
@@ -587,7 +587,7 @@ void __init __start_xen(multiboot_info_t *mbi)
     set_bit(DF_PRIVILEGED, &dom0->d_flags);
 
     /* Grab the DOM0 command line. Skip past the image name. */
-    cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL);
+    cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
     if ( cmdline != NULL )
     {
         while ( *cmdline == ' ' ) cmdline++;
index 248e42bd64db4e7d91f448281c5fa4e43ccd5d41..047d4aa3ea250d452a7e6d7e9535c6ef10f85724 100644 (file)
@@ -178,7 +178,7 @@ static void vmx_do_general_protection_fault(struct xen_regs *regs)
 
 static void vmx_vmexit_do_cpuid(unsigned long input, struct xen_regs *regs) 
 {
-    int eax, ebx, ecx, edx;
+    unsigned int eax, ebx, ecx, edx;
     unsigned long eip;
 
     __vmread(GUEST_EIP, &eip);
index 08d5e3d80abea372ed41a26140b50002e20c7efd..ee84c716f0e7d70918052d55f6d4d2e4caf0cb63 100644 (file)
@@ -290,7 +290,7 @@ static int vmx_decode(const unsigned char *inst, struct instruction *thread_inst
         case 0xa4:
             /* movsb */
             thread_inst->op_size = BYTE;
-            strcpy(thread_inst->i_name, "movs");
+            strcpy((char *)thread_inst->i_name, "movs");
             
             return DECODE_success;
         case 0xa5:
@@ -300,7 +300,7 @@ static int vmx_decode(const unsigned char *inst, struct instruction *thread_inst
                 thread_inst->op_size = LONG;
             }
             
-            strcpy(thread_inst->i_name, "movs");
+            strcpy((char *)thread_inst->i_name, "movs");
             
             return DECODE_success;
 
@@ -328,7 +328,7 @@ static int vmx_decode(const unsigned char *inst, struct instruction *thread_inst
             return DECODE_failure;
     }
     
-    strcpy(thread_inst->i_name, "mov");
+    strcpy((char *)thread_inst->i_name, "mov");
     if (*inst != 0x0f) {
         return DECODE_success;
     }
@@ -346,14 +346,14 @@ static int vmx_decode(const unsigned char *inst, struct instruction *thread_inst
                 
             }
             thread_inst->op_size = BYTE;
-            strcpy(thread_inst->i_name, "movzb");
+            strcpy((char *)thread_inst->i_name, "movzb");
             
             return DECODE_success;
         case 0xb7:
             thread_inst->op_size = WORD;
             index = get_index((inst + 1));
             thread_inst->operand[1] = mk_operand(LONG, index, 0, REGISTER);
-            strcpy(thread_inst->i_name, "movzw");
+            strcpy((char *)thread_inst->i_name, "movzw");
             
             return DECODE_success;
         default:
@@ -365,7 +365,7 @@ static int vmx_decode(const unsigned char *inst, struct instruction *thread_inst
     return DECODE_failure;
 }
 
-static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len)
+static int inst_copy_from_guest(unsigned char *buf, unsigned long guest_eip, int inst_len)
 {
     unsigned long gpte;
     unsigned long mfn;
@@ -382,7 +382,7 @@ static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len
         ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1));
         inst_start = (unsigned char *)map_domain_mem(ma);
                 
-        memcpy(buf, inst_start, inst_len);
+        memcpy((char *)buf, inst_start, inst_len);
         unmap_domain_mem(inst_start);
     } else {
         // Todo: In two page frames
@@ -502,7 +502,7 @@ void handle_mmio(unsigned long va, unsigned long gpa)
     store_xen_regs(inst_decoder_regs);
 
     // Only handle "mov" and "movs" instructions!
-    if (!strncmp(mmio_inst.i_name, "movz", 4)) {
+    if (!strncmp((char *)mmio_inst.i_name, "movz", 4)) {
         if (read_from_mmio(&mmio_inst)) {
             // Send the request and waiting for return value.
             mpci_p->mmio_target = mmio_inst.operand[1] | WZEROEXTEND;
@@ -514,7 +514,7 @@ void handle_mmio(unsigned long va, unsigned long gpa)
         }
     }
 
-    if (!strncmp(mmio_inst.i_name, "movs", 4)) {
+    if (!strncmp((char *)mmio_inst.i_name, "movs", 4)) {
         int tmp_dir;
 
         tmp_dir = ((va == inst_decoder_regs->edi) ? IOREQ_WRITE : IOREQ_READ);
@@ -522,7 +522,7 @@ void handle_mmio(unsigned long va, unsigned long gpa)
         return;
     }
 
-    if (!strncmp(mmio_inst.i_name, "mov", 3)) {
+    if (!strncmp((char *)mmio_inst.i_name, "mov", 3)) {
         long value = 0;
         int size, index;
 
index 9ae32fad1ee7bf9f6a991a1db7448732cb37944a..c6e7c213d8cafdc6b0b60135ee2d5a8328ddf09c 100644 (file)
@@ -16,7 +16,7 @@
 
 void cmdline_parse(char *cmdline)
 {
-    unsigned char *opt_end, *opt;
+    char *opt_end, *opt;
     struct kernel_param *param;
     
     if ( cmdline == NULL )
index 31abeeed21205199b6039707c553762e357c7f90..a69b5d19d846613099439cd201f2a3ea9620d256 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/debugger.h>
 
 /* opt_console: comma-separated list of console outputs. */
-static unsigned char opt_console[30] = OPT_CONSOLE_STR;
+static char opt_console[30] = OPT_CONSOLE_STR;
 string_param("console", opt_console);
 
 /* opt_conswitch: a character pair controlling console switching. */
@@ -408,7 +408,7 @@ void set_printk_prefix(const char *prefix)
 
 void init_console(void)
 {
-    unsigned char *p;
+    char *p;
 
     /* Where should console output go? */
     for ( p = opt_console; p != NULL; p = strchr(p, ',') )
index 868cabfb4de1770cd7a48c893f2f152d9dd14e46..99e1b1a42ee1839fb04c563b4107203639466d94 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/io.h>
 
 /* Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
-static unsigned char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
+static char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
 string_param("com1", opt_com1);
 string_param("com2", opt_com2);
 
@@ -395,7 +395,7 @@ void serial_putc(int handle, unsigned char c)
     __serial_putc(uart, handle, c);
 }
 
-void serial_puts(int handle, const unsigned char *s)
+void serial_puts(int handle, const char *s)
 {
     struct uart *uart = &com[handle & SERHND_IDX];
 
index 3614d52db57ffaadedeaf37edf75472048bb0e5b..1570f6860fc665b66f12f186297b5af69b176ff9 100644 (file)
@@ -192,7 +192,7 @@ extern void dodgy_tsc(void);
 /*
  * Generic CPUID function
  */
-static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
+static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
 {
     __asm__("cpuid"
             : "=a" (*eax),
index a9222da7b613c171b143a661733339a87578b42b..87de21eb4b340ae8820665a85d95e4b55cdc6480 100644 (file)
@@ -428,7 +428,7 @@ typedef struct {
     _MEMORY_PADDING(F);
     memory_t mod_len;         /* 56: Size (bytes) of pre-loaded module.    */
     _MEMORY_PADDING(G);
-    u8 cmd_line[MAX_CMDLINE]; /* 64 */
+    s8 cmd_line[MAX_CMDLINE]; /* 64 */
 } PACKED start_info_t; /* 320 bytes */
 
 /* These flags are passed in the 'flags' field of start_info_t. */
index cb61a66c6b5896543d7b0641fb5b7a93e19e23af..60fd64186de8eaeaae6421da6e453bbc6d6a1feb 100644 (file)
@@ -35,7 +35,7 @@ void serial_set_rx_handler(int handle, serial_rx_fn fn);
 void serial_putc(int handle, unsigned char c);
 
 /* Transmit a NULL-terminated string via the specified COM port. */
-void serial_puts(int handle, const unsigned char *s);
+void serial_puts(int handle, const char *s);
 
 /*
  * An alternative to registering a character-receive hook. This function